/* --------------------

	DOWNLOAD THE MOTD AND THE ADMIN
	FILE REQUIRED BY THE INFORMATION
	DESK

---------------------*/

resource.AddFile( "data/CG_FUN/motd.txt" )
resource.AddFile( "data/CG_FUN/admins.txt" )

// now we can add some more files

local path = "../"..GM.Folder.."/content"
local folders = {""}
while true do -- This does not trigger the infinite loop protection. I use it myself with a large content list without any problems. ~Lexi
	local curdir = table.remove(folders,1)
	if not curdir then break end
	local searchdir = path..curdir
	for _, filename in ipairs(file.Find(searchdir.."/*")) do
		if filename ~= ".svn" then
			if file.IsDir(searchdir.."/"..filename) then
				table.insert(folders,curdir.."/"..filename)
			else
				resource.AddSingleFile(string.sub(curdir.."/"..filename,2))
			end
		end
	end
end
